# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=mdbook
pkgver=0.4.2
pkgrel=0
pkgdesc="mdBook is a utility to create modern online books from Markdown files"
url="https://rust-lang.github.io/mdBook/"
arch="all !s390x !mips !mips64" # limited by cargo
license="MPL-2.0"
makedepends="rust cargo"
source="$pkgname-$pkgver.tar.gz::https://github.com/rust-lang-nursery/mdBook/archive/v$pkgver.tar.gz"
builddir="$srcdir/mdBook-$pkgver"
export CARGO_HOME="$srcdir"/cargo

build() {
	cargo build --release --verbose
}

check() {
	cargo test --all --release --verbose
}

package() {
	install -Dm755 target/release/mdbook "$pkgdir"/usr/bin/mdbook
}

sha512sums="ac44f21ada62af29b5189fbe9b0833ec9a4bf1513f498df5f2d5379760434d5dcd2f85ce38b6ff068bacc596a9d68646dcb51f978f7547251495b7367e378b7f  mdbook-0.4.2.tar.gz"
